/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wwy
 * Date: 2024-05-01
 * Time: 13:02
 */
//数字9出现次数
public class W {
    public static void main(String[] args) {
        int count=0;
        for (int i = 1; i <= 100; i++) {
            if(i/10==9) {
                count++;
            }
            if (i%10==9){
                count++;
            }
        }
        System.out.println(count);
    }
}

